many = input("请输入一个带有单位的金额：")
if many[-1] in ['Y', 'y']:
    D = eval(many[0:-1])/6
    print("{}元为{}美金".format(eval(many[0:-1]), D))
elif many[-1] in ['D', 'd']:
    Y = eval(many[0:-1])*6
    print("{}美金为{}元".format(eval(many[0:-1]), Y))
else:
    print("格式输入错误。")
